/* eslint-disable react/prop-types */
import React from 'react';
import { withRouter } from 'react-router-dom';
import '../../mysite.scss';
import Title from '@/components/mysite/titleWithBack'
import TaskForm from './form';

class TaskDetail extends React.Component {
  constructor(props) {
    super(props)
    this.state = {}
  }

  render() {
    let query = this.props.location.state
    let title;
    if (query) {
      title = '修改定时任务'
    } else {
      title = '新建定时任务'
    }
    return (
      <div className="detail_page">
        <Title title={title} />
        <div className="detail_form">
          <TaskForm></TaskForm>
        </div>
      </div>
    )
  }
}
export default withRouter(TaskDetail)
